package io.qar.controller;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileTypeUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import org.bouncycastle.tsp.TSPUtil;

import java.io.File;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @program: qar-cloud
 * @description:
 * @author: yyyyjinying
 * @create: 2023-10-25 17:04
 **/
public class Demo {
    public static void main(String[] args) {
        // String dateString = "2023-04-04" + " 00:00:00";
        // System.out.println(Timestamp.valueOf(dateString));

        String separator = File.separator;
        System.out.println(separator);
        String[] split = separator.split(File.separator + File.separator);
        System.out.println(Arrays.toString(split));
        // String sb = path + ftpFile.getName();
        // int level = getLevel(sb);

        String a = separator + "ccc" + separator + "bbbb" + separator + "aaa" + separator;
        System.out.println(a.substring(0, a.length()-1));

        // String a = separator + "ccc" + separator + "bbbb" + separator + "aaa" + separator;



        // String stts = "demo1.txt";
        // int i = stts.lastIndexOf(".");
        // System.out.println(i-1);
        // String substring = stts.substring(i);
        // System.out.println(substring);
        //
        // File file = FileUtil.file("logback-spring.xml");
        // String type = FileTypeUtil.getType(file);
        // System.out.println(type);

    }
}
